package com.lc.user.express.httpserver;

import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONObject;

/**
 * Created by Administrator on 2016/4/7.获取城市id
 */
@HttpInlet(Net.GET_CITY_ID)
public class GetCityId extends ZJDBAsyGet<GetCityId.Info> {
    public String city;

    public GetCityId(String city, AsyCallBack listener) {
        super(listener);
        this.city = city;
    }

    @Override
    protected Info parser(JSONObject object) {
        if (object.optInt("message") == 1) {
            Info info = new Info();
            info.cityid = object.optString("cityid");
            return info;
        }
        return null;
    }

    public static class Info {
        public String cityid;
    }
}
